package com.szqhyxj.youxiangju.biz.partnerHome.home.merchantdetails;

import com.google.gson.annotations.SerializedName;
import com.szqhyxj.youxiangju.sys.BaseResult;
import com.szqhyxj.youxiangju.sys.RetrofitFacade;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * Created by leung on 2018/11/21.
 */

public class MerchantDetailsModel {
    private interface MerchantDetailsService{
        @FormUrlEncoded
        @POST("monthresults/partnerInfo")
        Observable<BaseResult<MerchantDetailsEntity>> partnerDetails(
                @Field("organId") String organId,
                @Field("organType") int organType  ,
                @Field("statisticsType") int statisticsType
        );
    }

    public static Observable<BaseResult<MerchantDetailsEntity>> getmerchantDetailsDetails(String organId, int organType, int statisticsType) {
        return RetrofitFacade.Companion.getRetrofit().create(MerchantDetailsService.class).partnerDetails(
                organId,
                organType,
                statisticsType
        );
    }
    public static class MerchantDetailsEntity{

        @SerializedName("allReceivablesAmt")
        private int allReceivablesAmt;

        @SerializedName("idCard")
        private String idCard;

        @SerializedName("repaymentAmtMonth")
        private int repaymentAmtMonth;

        @SerializedName("allRepaymentAmt")
        private int allRepaymentAmt;

        @SerializedName("detAddress")
        private String detAddress;

        @SerializedName("receivablesAmtMonth")
        private int receivablesAmtMonth;

        @SerializedName("avatar")
        private Object avatar;

        @SerializedName("username")
        private Object username;

        public void setAllReceivablesAmt(int allReceivablesAmt){
            this.allReceivablesAmt = allReceivablesAmt;
        }

        public int getAllReceivablesAmt(){
            return allReceivablesAmt;
        }

        public void setIdCard(String idCard){
            this.idCard = idCard;
        }

        public String getIdCard(){
            return idCard;
        }

        public void setRepaymentAmtMonth(int repaymentAmtMonth){
            this.repaymentAmtMonth = repaymentAmtMonth;
        }

        public int getRepaymentAmtMonth(){
            return repaymentAmtMonth;
        }

        public void setAllRepaymentAmt(int allRepaymentAmt){
            this.allRepaymentAmt = allRepaymentAmt;
        }

        public int getAllRepaymentAmt(){
            return allRepaymentAmt;
        }

        public void setDetAddress(String detAddress){
            this.detAddress = detAddress;
        }

        public String getDetAddress(){
            return detAddress;
        }

        public void setReceivablesAmtMonth(int receivablesAmtMonth){
            this.receivablesAmtMonth = receivablesAmtMonth;
        }

        public int getReceivablesAmtMonth(){
            return receivablesAmtMonth;
        }

        public void setAvatar(Object avatar){
            this.avatar = avatar;
        }

        public Object getAvatar(){
            return avatar;
        }

        public void setUsername(Object username){
            this.username = username;
        }

        public Object getUsername(){
            return username;
        }

        @Override
         public String toString(){
            return
                "MerchantDetailsEntity{" +
                "allReceivablesAmt = '" + allReceivablesAmt + '\'' +
                ",idCard = '" + idCard + '\'' +
                ",repaymentAmtMonth = '" + repaymentAmtMonth + '\'' +
                ",allRepaymentAmt = '" + allRepaymentAmt + '\'' +
                ",detAddress = '" + detAddress + '\'' +
                ",receivablesAmtMonth = '" + receivablesAmtMonth + '\'' +
                ",avatar = '" + avatar + '\'' +
                ",username = '" + username + '\'' +
                "}";
            }
    }
}
